﻿using Foundation.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Dyao.Book.Entity
{
    [Table("BookCatalogueContent")]
    public class BookCatalogueContentEntity : IEntity<string>, ICreateOn, IUpdateOn, ICreateBy, IUpdateBy
    {
        /// <summary>
        /// ID
        /// </summary>
        [Required]
        [Column("Id", TypeName = "VARCHAR")]
        [Key]
        public string ID { get; set; }

        /// <summary>
        /// 对应目录编号
        /// </summary>
        public string BookCatalogueId { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        public int Seq { get; set; }

        /// <summary>
        /// 字数
        /// </summary>
        public int WordsNumber { get; set; }

        /// <summary>
        /// 正文
        /// </summary>
        [StringLength(1000)]
        public string Content { get; set; }

        /// <summary>
        /// 用户编号
        /// </summary>
        [Required]
        public int CreateUserId { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Required]
        public string CreateUserName { get; set; }

        /// <summary>
        /// 爬取时间
        /// </summary>
        [Required]
        public DateTime CreateDateTime { get; set; }

        /// <summary>
        /// 用户编号
        /// </summary>
        [Required]
        public int UpdateUserId { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Required]
        public string UpdateUserName { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Required]
        public DateTime UpdateDateTime { get; set; }
    }
}
